package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SBattlefieldInfo extends Object implements IMessageBase
    {
        public var id:int;
        public var status:EBattlefieldStatus;
        public var num1:int;
        public var num2:int;
        public var num3:int;
        public var maxPlayer:int;
        public const _type:int = 90;
        public static var _regist:SBattlefieldInfo = new SBattlefieldInfo(true);

        public function SBattlefieldInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SBattlefieldInfo();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.id);
            this.status.__write(param1);
            param1.writeByte(this.num1);
            param1.writeByte(this.num2);
            param1.writeByte(this.num3);
            param1.writeByte(this.maxPlayer);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.id = param1.readInt();
            this.status = EBattlefieldStatus.__read(param1);
            this.num1 = param1.readByte();
            this.num2 = param1.readByte();
            this.num3 = param1.readByte();
            this.maxPlayer = param1.readByte();
            
        }

    }
}
